#pragma once

// SingletonFactory.h
#ifndef SINGLETON_FACTORY_H
#define SINGLETON_FACTORY_H

#include "ClothingFactory.h"

class SingletonFactory {
public:
    static SingletonFactory* getInstance() {
        if (!instance) {
            instance = new SingletonFactory();
        }
        return instance;
    }

    Clothing* produceClothing(ClothingFactory* factory) {
        return factory->createClothing();
    }

private:
    SingletonFactory() {}
    static SingletonFactory* instance;
};

SingletonFactory* SingletonFactory::instance = nullptr;

#endif // SINGLETON_FACTORY_H
